function showAppealWaitTaskSearch(){
	window.location.href="showAppealWaitTaskSearch.do";
}

function ajaxFindAppealWaitTaskSearchList(currentPage,pageSize) {
	$.ajax({
		type:"post",
		url: "ajaxAppealWaitTaskSearchList.do",
		data:{
			currentPage:currentPage,
			pageSize:pageSize,
		},
		success:function(msg){
			$("#listAppealWaitTaskBox").html(msg);
		}
	});
}

function ajaxShowAppealInfoAudit(id){
	$.ajax({
		type:"post",
		url:"ajaxShowAppealInfoAudit.do",
		data:{appealAuditId:id},
		success:function(msg){
			$("#dialog").html(msg);
			$("#dialog").dialog({
				autoOpen: true,
				width: 750,
				title:$(".dialogtitle").attr("title"),
				modal: true,
				buttons: [
				          {
				        	  text: "保存",
				        	  click: function() {
				        		  ajaxSaveAppealAudit(this);
				        	  }
				          },
				          {
				        	  text: "关闭",
				        	  click: function() {
				        		  $(this).dialog( "close" );
				        	  }
				          }
				          ]
			});
		}
	});
}

function ajaxSaveAppealAudit(objDialog) {
	appealAuditValidate();
	if ($("#frmAppealWaitTask").valid()) {
		$(objDialog).dialog("close");
		var options ={
				type: "post",
				url : "ajaxSaveAppealAudit.do",
				success: function (msg) {
					clearInput("#sltAppealWaitTask");
					ajaxFindAppealWaitTaskSearchList();
					showMessageDialog("提示","申诉审核信息保存成功。",null,dialogType.info);
				}
		};
		$("#frmAppealWaitTask").ajaxSubmit(options);
	}
}

function ajaxSaveAppealUnaudit(objDialog) {
	appealAuditValidate();
	if ($("#frmAppealWaitTask").valid()) {
		$(objDialog).dialog("close");
		var options ={
				type: "post",
				url : "ajaxSaveAppealUnaudit.do",
				success: function (msg) {
					clearInput("#sltAppealWaitTask");
					ajaxFindAppealWaitTaskSearchList();
					showMessageDialog("提示","申诉审核不通过保存成功。",null,dialogType.info);
				}
		};
		$("#frmAppealWaitTask").ajaxSubmit(options);
	}
}


function appealAuditValidate(){
	$("#frmAppealWaitTask").validate({
		errorLabelContainer: $("#infoAppealWaitTask"),
		rules : {
			sectionname : {
				required :true				
			},
			endmeter : {
				required :true,
			}
		},
		messages : {
			sectionname : {
				required :"请输入路段名称！"
			},
			endmeter : {
				required :"请输入结束米数！",
			}
		},
		success: function(label) {
			label.html("&nbsp;");
		}
	});
}